//
//  UIBarButtonItem+Extension.swift
//  WeiBo test
//
//  Created by Aquarius_wing on 16/5/12.
//  Copyright © 2016年 Wing. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    convenience init(imageName:String) {
        let btn = UIButton(type: .Custom)
        btn.setImage(UIImage(named: imageName), forState: .Normal)
        btn.setImage(UIImage(named: imageName+"_highlighted"), forState: .Highlighted)
        btn.sizeToFit()
        self.init(customView: btn)
    }
}